{# Copyright (c) 2006-2007, PreFab Software Inc. #}
{# modificat per apsl #}

{% load blog_extras %}
{% load prefab_tags %}
{% load comment_utils %}
{% load markup i18n %}

<!-- articles -->
<div class='column1-unit'>
    <h1 class="pagetitle"><a href='{{ object.get_absolute_url }}' title='{{ object.headline }}' rel='bookmark'>{{ object.headline }}</a></h1>
    <h3>
		{% trans "Escrit per " %}<a href='{% BLOG_ROOT %}user/{{ object.user }}/'>{{ object.user|title }}</a>{% trans " a " %}<a href='{% BLOG_ROOT %}{{ object.pub_date|date:"Y/m/d" }}/'>{{ object.pub_date|date:"d" }}</a> de <a href='{% BLOG_ROOT %}{{ object.pub_date|date:"Y/m" }}/'>{{ object.pub_date|date:"F" }}</a> , <a href='{% BLOG_ROOT %}{{ object.pub_date|date:"Y" }}/'>{{ object.pub_date|date:"Y" }}</a> a les {{ object.pub_date|time }}    {% if user.is_authenticated %}&nbsp; <a href="/tools/entry/{{object.id}}/">{% trans "Editar" %}</a>&nbsp;<a href="/blogmaker/{{object.id}}/postTrackbacks/">Post trackbacks</a>{% endif %}
    </h3>    
    
    {% if object.image %}
        <a href='{{ object.get_absolute_url }}' class='image'><img src='{{ object.get_image_url }}' class='blog' alt="Link to {{ object.headline }}" title="{{object.copyright}}"/></a>
    {% endif %}
    {{ object.body|safe }}
    
    {% if forloop.counter %}
    {% else %}
    {% with object.links as entry_links %}
    {%if entry_links %}
            <h6>{% trans "Enlla&ccedil;os citats" %}</h6>
            <ul>
                {% for link in entry_links %}
                <li>{{foorloop.counter}} <a href="{{link.url}}" target="_blank" title="{{link.title}}">{{link.anchor}}</a></li>
            {% endfor %}
                </ul>
        {% endif %}
    {% endwith %}
    {% endif %}
    <!-- Autodiscovery for trackback url
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
            xmlns:dc="http://purl.org/dc/elements/1.1/"
            xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
    <rdf:Description
        rdf:about="{{ object.get_absolute_url }}"
        dc:identifier="{{ object.get_absolute_url }}"
        dc:title="{{ object.headline }}"
        trackback:ping="{{ object.get_absolute_url }}trackback/" />
    </rdf:RDF>
    -->
    <p class="details">
    {% get_public_comment_count for blog.entry object.id as comment_count %}
    {% get_public_trackback_count for blog.entry object.id as trackback_count %}
    <a href='{{ object.get_absolute_url }}#comments' >{{ comment_count }} {% trans "comentari"%}{{ comment_count|pluralize }}</a>,
    <a href='{{ object.get_absolute_url }}#trackbacks'>{{ trackback_count }} trackback{{ trackback_count|pluralize }}</a> (<a href="{{ object.get_absolute_url }}trackback/" rel="trackback">URL</a>)
    {% for t in object.get_tags %}{% if forloop.first %},&nbsp;<a href='{% BLOG_ROOT %}tag/' class='blog_sm'>{% trans "Tags:" %}</a>{% endif %} 
    <a href="{{ t.get_absolute_url }}" title="{% trans 'Entrades classificades com'%} '{{ t }}'">{{ t }}
    </a>
    {% endfor %} 
    </p>
    
    {% if forloop.counter %}
    {% else %}
    <div class="post_related_entries">
    {% for object in object.get_related_entries %}
    {% if forloop.first %}
    <span>{% trans "Relacionats:" %}</span>
    <br />
    {% endif %}
    <span>&nbsp;&nbsp;&nbsp;{{ forloop.counter }}. </span><a href='{{ object.get_absolute_url }}'>
    {{ object.headline }}
    </a>   
    {% endfor %}    
    </div>
    {% endif %}
    <br /> 
</div>
<!-- fi de la secció d'articles -->
